package mvc;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Stroke;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.border.Border;
import javax.swing.border.EtchedBorder;
import javax.swing.border.LineBorder;

public class NiceButton extends JButton{
	public NiceButton(){
		super();
		
		setBackground(Color.LIGHT_GRAY);
//		this.setBorder(new LineBorder(Color.GRAY, 20));
		this.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED, Color.GRAY, Color.GRAY));
	}
	
	public void paintComponent(Graphics gInput){
		super.paintComponent(gInput);
		
		Graphics2D g = (Graphics2D) gInput;
		Dimension size = super.getSize();
		
		g.setStroke(new BasicStroke(5.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND));
		g.setColor(Color.RED);
		g.drawRect(0, 0, (int) size.getWidth(), (int) size.getHeight());
	}
	
//	public void paintBorder(Graphics gInput){
//		Graphics2D g = (Graphics2D) gInput;
//		Dimension size = super.getSize();
//		
//		g.setStroke(new BasicStroke(5.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND));
//		g.setColor(Color.RED);
//		g.drawRect(-3, -3, (int) size.getWidth() + 7, (int) size.getHeight() + 7);
//	}
//	
//	public void paintFill(Graphics gInput){
//		
//	}
}
